const path = require("path")
const merge = require('webpack-merge')
const { bases } = require('./webpack.base')
module.exports = merge(bases, { //webpack基于node构建的
  mode: "production", // production
  entry: ['./src/index.ts'],
  devtool: "cheap-module-source-map",
  devServer: {
    grogress: true,
    historyApiFallback: false
    //true 表示webpack支持使用history false路由默认是hash
  },
  performance: {
    hints: 'warning', //false关闭提示 下面设置就没必要了
    //入口起点的最大体积
    maxEntrypointSize: 50000000,
    //生成文件的最大体积
    maxAssetSize: 30000000,
    //只给出 js 文件的性能提示
    assetFilter: function (assetFilename) {
      return assetFilename.endsWith('.js');
    }
  }
})